<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第一个vue程序</title>
    <script src="vue.js"></script>
</head>
<body>
    <template id="t1">
        <div>
            <slot name="CPU">这里是CPU的插槽</slot>
            <slot name="GPU">这里是GPU的插槽</slot>
            <slot name="Memory">这里是内存的插槽</slot>
        </div>
    </template>
   <div id="app">
       <computer>
           <div slot="CPU">Intel(R) Core(TM) i5-6400 CPU@2.70GHz</div>
           <div slot="GPU">i9</div>
           <div slot="Memory">金士顿</div>
       </computer>
   </div>
</body>
</html>
<script>
    var vm=new Vue({
        el:'#app',
        components:{
            'computer':{
                template:'#t1'
            }
        }
    });
</script>